package com.atwisdom.star.serviceController.report;

import com.alibaba.fastjson.JSONObject;
import com.atwisdom.star.common.vo.ResultInfo;
import com.atwisdom.star.exception.pojo.BusinessException;
import com.atwisdom.star.log.aop.StarAnnotation;
import com.atwisdom.star.service.equipment.OverLimitReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: ReportServiceController
 * @ Description:   报表
 * @author: wjj
 * @date: 2024/7/26
 */
@RestController
@RequestMapping("/report")
public class ReportServiceController {

    @Autowired
    private OverLimitReportService overLimitReportService;


    @StarAnnotation
    @PostMapping("/statisticsByProduct")
    public ResultInfo<?> statisticsByProduct(@RequestBody JSONObject param) throws BusinessException {
        return overLimitReportService.statisticsByProduct();
    }

    @StarAnnotation
    @PostMapping("/statisticsByEquip")
    public ResultInfo<?> statisticsByEquip(@RequestBody JSONObject param) throws BusinessException {
        return overLimitReportService.statisticsByEquip();
    }

    @StarAnnotation
    @PostMapping("/testTechAdd")
    public ResultInfo<?> testTechAdd(@RequestBody JSONObject param) throws BusinessException {
        return overLimitReportService.testTechAdd(param);
    }

    @StarAnnotation
    @PostMapping("/testLabAdd")
    public ResultInfo<?> testLabAdd(@RequestBody JSONObject param) throws BusinessException {
        return overLimitReportService.testLabAdd(param);
    }
}